<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@page import="java.net.URLDecoder"%>
<%@ include file="/system/include/taglib.jsp"%>
<html>
<head>
<base href="${pageScope.basePath }">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>车船登记</title>
<link type="text/css" rel="stylesheet" href="system/css/style.css" />
<link type="text/css" rel="stylesheet" href="system/plugins/validateMyForm/css/plugin.css" />
<script type="text/javascript" language="javascript" src="system/js/public.js"></script>
<script type="text/javascript" language="javascript" src="system/js/jquery-1.4.2.js"></script>
<script type="text/javascript" language="javascript" src="system/plugins/validateMyForm/js/jquery.validateMyForm.1.5.js"></script>
<script type="text/javascript" language="javascript" src="system/js/json2.js"></script>
<script type="text/javascript" language="javascript" src="system/js/NewDatePicker/WdatePicker.js"></script>
<script type="text/javascript" language="javascript" src="system/js/verify1.js"></script>
<script type="text/javascript" >
	$(document).ready(
		function(){
			$("#form1").validateMyForm();
		}
	);
</script>
</head>
<body>
<div class="main">
	<div class="position">当前位置: <a href="sysadm/desktop.jsp">桌 面</a> → 车船情况登记</div>
	<div class="mainbody">
		<div class="operate_info">操作说明：带 <span style="color: red;">*</span> 号必填</div>
		<div class="table">
			<form id="form1" action="system/book/car_register_save.do" method="post">
				<table width="100%" border="0" cellpadding="1" cellspacing="1" class="table_form">
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">车主类别：</td>
						<td>
							<mytag:List name="CZLB" table="TDmCcsCzlb">xyBj='y' or xyBj='Y'</mytag:List>
							<select name="czlbDm" id="czlbDm" onchange="CZLBChange(this.value)" class="required">
								<option value="">---请选择---</option>
								<logic:iterate id="czlb" name="CZLB">
									<option value="${czlb.czlbDm }" <c:if test="${param.czlbDm==czlb.czlbDm }">selected</c:if>>${czlb.czlbMc }</option>
								</logic:iterate>
							</select>
							<span style="color: red;">*</span>
						</td>
						<td align="right">登记状态：</td>
						<td><input name="djztDm" id="djztDm" value="正常使用" readonly="readonly" /></td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">纳税人编码：</td>
						<td><input name="nsrbm" id="nsrbm" value="${param.nsrbm }" onblur="searchCarOwner('system/ajax/common_findCarOwner.do',this)" onkeypress="onlydigit(this)" class="required" />
							<span style="color: red;">*</span>
						</td>
						<td align="right">车船登记号：</td>
						<td><input name="ccdjh" id="ccdjh" value="<mytag:sequence key="ccdjxx_seq" />" readonly="readonly" />
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">车主名称：</td>
						<td><input name="czMc" id="czMc" value="<%=request.getParameter("czMc")==null?"":URLDecoder.decode(request.getParameter("czMc"),"UTF-8") %>" class="required"/>
							<span style="color: red;">*</span>
						</td>
						<td align="right">身份证号码：</td>
						<td><input name="sfzhm" id="sfzhm" value="${param.sfzhm }" onblur="checkID(this)" onfocus="tip(this,divProvince)" class="required"/>
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">地址：</td>
						<td><input name="czDz" id="czDz" value="<%=request.getParameter("czDz")==null?"":URLDecoder.decode(request.getParameter("czDz"),"UTF-8") %>" class="required" />
							<span style="color: red;">*</span>
						</td>
						<td align="right">电话：</td>
						<td><input name="czDh" id="czDh" value="${param.czDh }" onblur="checkPM(this)" onfocus="tip(this,divProvince)" class="required" />
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">车船牌照号码：</td>
						<td>
							粤T-<input name="ccpzh" id="ccpzh" onblur="verifyCarNo('system/ajax/common_findCarNo.do',this,jjcclxDm,ccdjh)" class="required"/>
							<span style="color: red;">*</span>
							<label id="lblccpzh"></label>
						</td>
						<td align="right">车船类型：</td>
						<td>
							<mytag:List name="JJCCLX" table="TDmCcsJjcclx" orderBy="jjcclxDm">xyBj='y' or xyBj='Y'</mytag:List>
							<select name="jjcclxDm" id="jjcclxDm" onblur="verifyCarNo('system/ajax/common_findCarNo.do',ccpzh,this,ccdjh); searchCarInfo('system/ajax/common_findCarInfo.do',this);" class="required">
								<option value="">---请选择---</option>
								<logic:iterate id="jjcclx" name="JJCCLX">
									<option value="${jjcclx.jjcclxDm }">${jjcclx.jjcclxMc }</option>
								</logic:iterate>
							</select>
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">发动机号：</td>
						<td><input name="fdjh" id="fdjh" class="required" />
							<span style="color: red;">*</span>
						</td>
						<td align="right">车架号：</td>
						<td><input name="cjh" id="cjh" class="required" />
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">厂牌型号：</td>
						<td><input name="cpxh" id="cpxh" class="required" />
							<span style="color: red;">*</span>
						</td>
						<td align="right">行驶证发证日期：</td>
						<td><input name="fzRq" id="fzRq" onFocus="WdatePicker()" class="required" />
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">核定载重量（吨）：</td>
						<td><input name="hdzzl" id="hdzzl" readonly="readonly" onblur="CheckValue(this)" onkeypress="onlynum(this)" class="required" />
							<span style="color: red;">*</span>
						</td>
						<td align="right">整备质量（吨）：</td>
						<td><input name="zbzl" id="zbzl" readonly="readonly" onblur="CheckValue(this)" onkeypress="onlynum(this)" class="required" />
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">核定载客（人）：</td>
						<td><input name="hdzkl" id="hdzkl" readonly="readonly" onblur="CheckValue(this)" onkeypress="onlydigit(this)" class="required" />
							<span style="color: red;">*</span>
						</td>
						<td align="right">排气量（升）：</td>
						<td><input name="pql" id="pql" readonly="readonly" onblur="CheckValue(this)" onkeypress="onlynum(this)" class="required" />
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">登记日期：</td>
						<td><input name="djRq" id="djRq" onFocus="WdatePicker({onpicked:function(){gdt('system/book/car_register_gdt.do',this,gzRq,sbqsny);}})" onblur="gdt('system/book/car_register_gdt.do',this,gzRq,sbqsny)" class="required" />
							<span style="color: red;">*</span>
						</td>
						<td align="right">购置时间：</td>
						<td><input name="gzRq" id="gzRq" onFocus="WdatePicker({onpicked:function(){gdt('system/book/car_register_gdt.do',djRq,this,sbqsny);}})" onblur="gdt('system/book/car_register_gdt.do',djRq,this,sbqsny)" class="required" />
							<span style="color: red;">*</span>
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">申报起始年月：</td>
						<td><input name="sbqsny" id="sbqsny" readonly="readonly" /></td>
						<td align="right"></td>
						<td></td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right">备注：</td>
						<td colspan="3">
							<textarea name="bz" id="bz" cols="50" rows="3"></textarea>
							非必填，长度不能超过100 
						</td>
					</tr>
					<tr onMouseOver="mouseOver(this)" onMouseOut="mouseOut(this)">
						<td align="right"></td>
						<td colspan="3"><input type="checkbox" name="next" id="next" />保存成功后登记同一车主下一车辆</td>
					</tr>
					<tr>
						<td colspan="4" class="form_button" style="padding-top:10px;">
							<input type="submit" value="保存并继续登记" />
							<input type="submit" value="保存并申报" />
							<input type="reset" value="重置" />
						</td>
					</tr>
				</table>
				<div id="divProvince" name="divProvince" style="display:none; position:absolute;width:260px;background-color:#BFEBEE; border:1px solid #BEC0BF;padding:5px;font-size:12px;">  
				        电话格式 ：<br/>手机：18,15,13开头 + 9位。<br/>固话：区号-电话。 例 ： 0760-88888888
				</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	function CZLBChange(value){
		if(value==""){
			$('#nsrbm').attr("value",'');
			$('#nsrbm').attr("readonly",false);
			$('#sfzhm').attr("value",'');
			$('#sfzhm').attr("readonly",false);
			$('#czMc').attr("value",'');
			$('#czDz').attr("value",'');
			$('#czDh').attr("value",'');
		}
		if(value=="01"){
			$('#nsrbm').attr("value",'');
			$('#nsrbm').attr("readonly",false);
			$('#sfzhm').attr("value",' ');
			$('#sfzhm').attr("readonly",true);
			$('#czMc').attr("value",'');
			$('#czDz').attr("value",'');
			$('#czDh').attr("value",'');
		}
		if(value=="02"){
			$('#nsrbm').attr("value",'00000099997');
			$('#sfzhm').attr("value",'');
			$('#nsrbm').attr("readonly",true);
			$('#sfzhm').attr("readonly",false);
			$('#czMc').attr("value",'');
			$('#czDz').attr("value",'');
			$('#czDh').attr("value",'');
		}
	}
</script>
</body>
</html>
